<?xml version="1.0" encoding="UTF-8"?>
<bonosoftbuilder>
 <project ProjectType = "DAL" ProductVersion = "2.0.1">
  <tablelist>
   <table name="epConnectionString">
    <attribute name="ConnectionStringId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="ConnectionString" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="255" defaultvalue="Provider=<Your Provider>;Initial Catalog=<Your Catalog>;User Id=<Your User Id>;Password=<Your User Password>;" />
    <sql querytype="SELECT" name="GetAllConnections" sqlstr="" paramstr="" expressionstr="ConnectionStringId, ;ConnectionString, " jointable="" />
   </table>
   <table name="epContentManagerSettings">
    <attribute name="ContentManagerSettingsId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="WorkflowId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="ModuleID" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <foreignkey name="FK_epContentManagerSettings_epFormDefinition1" remotetable="epFormDefinition">
     <keyattribute localattribute="FormDefinitionId" remoteattribute="FormDefinitionId" />
    </foreignkey>
    <foreignkey name="FK_epContentManagerSettings_epWorkflow1" remotetable="epWorkflow">
     <keyattribute localattribute="WorkflowId" remoteattribute="WorkflowId" />
    </foreignkey>
    <foreignkey name="FK_epContentManagerSettings_Modules1" remotetable="Modules">
     <keyattribute localattribute="ModuleID" remoteattribute="ModuleID" />
    </foreignkey>
   </table>
   <table name="epContentSecurity">
    <attribute name="ContentSecurityId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="MetaDataId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="ContentAuthorizedViewer" datatype="dtInt" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <foreignkey name="FK_epContentSecurity_epMetaData1" remotetable="epMetaData">
     <keyattribute localattribute="MetaDataId" remoteattribute="MetaDataId" />
    </foreignkey>
   </table>
   <table name="epContentViewerSettings">
    <attribute name="ContentViewerSettingsId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="ModuleID" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="TemplateDefinitionId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <foreignkey name="FK_epContentViewerSettings_epTemplateDefinition1" remotetable="epTemplateDefinition">
     <keyattribute localattribute="TemplateDefinitionId" remoteattribute="TemplateDefinitionId" />
    </foreignkey>
    <foreignkey name="FK_epContentViewerSettings_Modules1" remotetable="Modules">
     <keyattribute localattribute="ModuleID" remoteattribute="ModuleID" />
    </foreignkey>
   </table>
   <table name="epControlType">
    <attribute name="ControlTypeId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="ControlPath" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="255" defaultvalue="" />
    <sql querytype="SELECT" name="GetAllControlType" sqlstr="ORDER BY epControlType.Title" paramstr="" expressionstr="ControlTypeId, ;Title, ;ControlPath, " jointable="" />
   </table>
   <table name="epDataConnection">
    <attribute name="DataConnectionId" datatype="dtInt" primarykey="True" identity="False" nullable="False" defaultvalue="" />
    <attribute name="TableName" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="ConnectionStringId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="PrimaryKeyName" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <foreignkey name="FK_epDataConnection_epConnectionString1" remotetable="epConnectionString">
     <keyattribute localattribute="ConnectionStringId" remoteattribute="ConnectionStringId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetAllDataConnections" sqlstr="WHERE @ConnectionStringId =  epDataConnection.ConnectionStringId  ORDER BY TableName" paramstr="ConnectionStringId,Integer" expressionstr="DataConnectionId, ;TableName, ;ConnectionStringId, ;PrimaryKeyName, " jointable="" />
   </table>
   <table name="epFieldDefinition">
    <attribute name="FieldDefinitionId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="CssClass" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="32" defaultvalue="" />
    <attribute name="Search" datatype="dtBool" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <attribute name="Tooltip" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="1024" defaultvalue="" />
    <attribute name="SourceField" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="ControlTypeId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <foreignkey name="FK_epFieldDefinition_epControlType1" remotetable="epControlType">
     <keyattribute localattribute="ControlTypeId" remoteattribute="ControlTypeId" />
    </foreignkey>
    <foreignkey name="FK_epFieldDefinition_epFormDefinition1" remotetable="epFormDefinition">
     <keyattribute localattribute="FormDefinitionId" remoteattribute="FormDefinitionId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetJoinFieldDefinitionControlTypes" sqlstr="" paramstr="" expressionstr="FieldDefinitionId, ;Title, ;CssClass, ;Search, ;Tooltip, ;SourceField, ;FormDefinitionId, ;ControlTypeId, " jointable="" />
   </table>
   <table name="epFormDataConnections">
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="True" identity="False" nullable="False" defaultvalue="" />
    <attribute name="DataConnectionId" datatype="dtInt" primarykey="True" identity="False" nullable="False" defaultvalue="" />
    <foreignkey name="FK_epFormDataConnections_epDataConnection1" remotetable="epDataConnection">
     <keyattribute localattribute="DataConnectionId" remoteattribute="DataConnectionId" />
    </foreignkey>
    <foreignkey name="FK_epFormDataConnections_epFormDefinition1" remotetable="epFormDefinition">
     <keyattribute localattribute="FormDefinitionId" remoteattribute="FormDefinitionId" />
    </foreignkey>
   </table>
   <table name="epFormDefinition">
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <sql querytype="SELECT" name="GetAllFormDefinition" sqlstr="ORDER BY  epFormDefinition.Title" paramstr="" expressionstr="FormDefinitionId, ;Title, " jointable="" />
    <sql querytype="SELECT" name="GetJoinFormDefinitionDataConnections" sqlstr="" paramstr="" expressionstr="FormDefinitionId, ;Title, " jointable="" />
    <sql querytype="SELECT" name="GetJoinFormDefinitionFieldDefinition" sqlstr="" paramstr="" expressionstr="FormDefinitionId, ;Title, " jointable="" />
   </table>
   <table name="epMetaData">
    <attribute name="MetaDataId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="255" defaultvalue="" />
    <attribute name="PKValue" datatype="dtGuid" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <attribute name="Status" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="1" defaultvalue="" />
    <attribute name="TaxonomyId" datatype="dtInt" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="ScheduleDate" datatype="dtDateTime" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <attribute name="PublishingDate" datatype="dtDateTime" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <attribute name="UserID" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="PortalID" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <foreignkey name="FK_epMetaData_epFormDefinition1" remotetable="epFormDefinition">
     <keyattribute localattribute="FormDefinitionId" remoteattribute="FormDefinitionId" />
    </foreignkey>
    <foreignkey name="FK_epMetaData_epTaxonomy1" remotetable="epTaxonomy">
     <keyattribute localattribute="TaxonomyId" remoteattribute="TaxonomyId" />
    </foreignkey>
    <foreignkey name="FK_epMetaData_Portals1" remotetable="Portals">
     <keyattribute localattribute="PortalID" remoteattribute="PortalID" />
    </foreignkey>
    <foreignkey name="FK_epMetaData_Users1" remotetable="Users">
     <keyattribute localattribute="UserID" remoteattribute="UserID" />
    </foreignkey>
    <sql querytype="SELECT" name="GetAllMetaData" sqlstr="WHERE epMetaData.PortalID =  @PortalID  order by epMetada.Title " paramstr="PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetJoinAuthorizedViewers" sqlstr="WHERE epMetaData.MetaDataId =  @MetaDataId AND  @PortalID =  epMetaData.PortalID" paramstr="MetaDataId,Integer;PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetJoinMetaDataByTaxonomy" sqlstr="WHERE epMetaData.TaxonomyId =  @TaxonomyId  AND epMetaData.Status = "P"  AND  epMetaData.PortalID =  @PortalID ORDER BY  epMetaData.PublishingDate DESC,  epMetaData.Title ASC" paramstr="TaxonomyId,Integer;PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetMetaDataByUser" sqlstr="WHERE epMetaData.UserID =   @UserID AND  epMetaData.PortalID =  @PortalID ORDER BY  epMetaData.PublishingDate  DESC" paramstr="UserID,Integer;PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetMoreRecentApprovedContent" sqlstr="WHERE epMetaData.PublishingDate <= getdate() and  epMetaData.Status = "P"  AND  @PortalID =  epMetaData.PortalID ORDER BY Title" paramstr="PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetNotApprovedMetaDataByUser" sqlstr="WHERE  epMetaData.UserID =  @UserID and  epMetaData.Status = "W"  AND  epMetaData.PortalID @PortalID ORDER BY Title" paramstr="PublishingDate,DateTime;UserID,Integer;PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
    <sql querytype="SELECT" name="GetWorkingMetaDataByUser" sqlstr="WHERE @UserID = epMetaData.UserID AND epMetaData.Status = "W"  AND epMetaData.PortalID =  @PortalID ORDER BY   epMetaData.ScheduleDate DESC, Title ASC" paramstr="UserID,Integer;PortalID,Integer" expressionstr="MetaDataId, ;Title, ;PKValue, ;Status, ;TaxonomyId, ;FormDefinitionId, ;ScheduleDate, ;PublishingDate, ;UserID, ;PortalID, " jointable="" />
   </table>
   <table name="epMetaDataTask">
    <attribute name="MetaDataTaskId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="TaskOrder" datatype="dtInt" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <attribute name="StartDate" datatype="dtDateTime" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <attribute name="Status" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="1" defaultvalue=" " />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="TaskOwnerId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="FinishDate" datatype="dtDateTime" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <foreignkey name="FK_epMetaDataTask_epTaskOwner1" remotetable="epTaskOwner">
     <keyattribute localattribute="TaskOwnerId" remoteattribute="TaskOwnerId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetJoinMetaDataTasksByOwner" sqlstr="WHERE  @TaskOwnerId =  epMetaDataTask.TaskOwnerId AND   epMetaDataTask.Status <> "F" ORDER BY StartDate ASC" paramstr="TaskOwnerId,Integer" expressionstr="MetaDataTaskId, ;TaskOrder, ;StartDate, ;Status, ;Title, ;TaskOwnerId, " jointable="" />
   </table>
   <table name="epTaskOwner">
    <attribute name="TaskOwnerId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="OwnerId" datatype="dtInt" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <attribute name="OwnerType" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="1" defaultvalue="U" />
    <sql querytype="SELECT" name="GetJoinTasksByOwner" sqlstr="ORDER BY  epTaskOwner.OwnerType" paramstr="OwnerId,Integer" expressionstr="TaskOwnerId, ;OwnerId, ;OwnerType, " jointable="" />
   </table>
   <table name="epTasks">
    <attribute name="TaskId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="TaskOwnerId" datatype="dtInt" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <attribute name="WorkflowId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <attribute name="TaskOrder" datatype="dtInt" primarykey="False" identity="False" nullable="False" defaultvalue="" />
    <foreignkey name="FK_epTasks_epTaskOwner1" remotetable="epTaskOwner">
    </foreignkey>
    <foreignkey name="FK_epTasks_epWorkflow1" remotetable="epWorkflow">
     <keyattribute localattribute="WorkflowId" remoteattribute="WorkflowId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetTasksByWorkflow" sqlstr="WHERE epTasks.WorkflowId =  @WorkflowId ORDER BY TaskOrder" paramstr="WorkflowId,Integer" expressionstr="TaskId, ;Title, ;TaskOwnerId, ;WorkflowId, ;TaskOrder, " jointable="" />
   </table>
   <table name="epTaxonomy">
    <attribute name="TaxonomyId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Description" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="512" defaultvalue="" />
    <attribute name="ParentId" datatype="dtInt" primarykey="False" identity="False" nullable="True" defaultvalue="" />
    <foreignkey name="FK_epTaxonomy_epTaxonomy1" remotetable="epTaxonomy">
     <keyattribute localattribute="TaxonomyId" remoteattribute="TaxonomyId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetTaxonomyRoot" sqlstr="WHERE epTaxonomy.ParentId = -1 ORDER BY Title" paramstr="" expressionstr="TaxonomyId, ;Description, ;ParentId, " jointable="" />
    <sql querytype="SELECT" name="GetTaxonomySubTree" sqlstr="WHERE epTaxonomy.ParentId =  @ParentId ORDER BY Title" paramstr="ParentId,Integer" expressionstr="TaxonomyId, ;Description, ;ParentId, " jointable="" />
   </table>
   <table name="epTemplateDefinition">
    <attribute name="TemplateDefinitionId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Body" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="2000000" defaultvalue="" />
    <attribute name="FormDefinitionId" datatype="dtInt" primarykey="False" identity="False" nullable="False" />
    <foreignkey name="FK_epTemplateDefinition_epFormDefinition1" remotetable="epFormDefinition">
     <keyattribute localattribute="FormDefinitionId" remoteattribute="FormDefinitionId" />
    </foreignkey>
    <sql querytype="SELECT" name="GetJoinTemplateDefinitionFormDefinition" sqlstr="WHERE epTemplateDefinition.FormDefinitionId = @FormDefinitionId" paramstr="FormDefinitionId,Integer" expressionstr="TemplateDefinitionId, ;Body, ;FormDefinitionId, " jointable="" />
   </table>
   <table name="epWorkflow">
    <attribute name="WorkflowId" datatype="dtInt" primarykey="True" identity="True" nullable="False" defaultvalue="" />
    <attribute name="Title" datatype="dtText" primarykey="False" identity="False" nullable="False" charlen="64" defaultvalue="" />
    <attribute name="Description" datatype="dtText" primarykey="False" identity="False" nullable="True" charlen="512" defaultvalue="" />
    <sql querytype="SELECT" name="GetAllWorkflows" sqlstr="ORDER BY Title" paramstr="" expressionstr="WorkflowId, ;Title, ;Description, " jointable="" />
   </table>
  </tablelist>
  <querylist>
  </querylist>
 </project>
</bonosoftbuilder>
